{template 'header'}
  <style type="text/css">
      .retain-buy-page {
        text-align: center;
        background-image: url({RES}img/failbg2.png);
        background-color: #fff;
        background-attachment: fixed;
        padding-bottom: 80px;
        color: #434343;
        background-repeat: no-repeat;
        background-size: contain;
        background-position-y: -36px;
		padding-top: 30px;
      }
      
      .retain-buy-page .banner {
        position: relative;
        background: #fff;
        height: 160px;
        margin: 0px 30px 15px;
        width: auto;
        border-radius: 15px;
        padding: 20px 15px 15px;
        box-shadow: 0 3px 10px 1px #eaeaea
      }
      
      .retain-buy-page .countdown {
        width: 130px;
        font-size: 40px;
        height: 50px;
        line-height: 50px;
        border-radius: 50px;
        box-shadow: 0 3px 10px 1px #ffd5cc;
        background: -webkit-linear-gradient(left,#fe946f,#fe5164);
        color: #fff
      }
      
      .retain-buy-page .user-jud {
        position: relative;
        margin: 15px
      }
      
      .retain-buy-page .user-jud .title {
        letter-spacing: 2px;
        color: #fff;
        font-size: 18px;
        top: 16px
      }
      
      .retain-buy-page .user-jud .jud-wrapper {
        position: absolute;
        width: 88%;
        height: 75%;
        top: 20%;
        left: 50%;
        -webkit-transform: translateX(-50%);
        transform: translateX(-50%);
        overflow-y: hidden;
        border-radius: 0 0 40px 40px
      }
      
      .retain-buy-page .user-jud .jud-wrapper ul li {
        width: 100%;
        text-align: left;
        padding: 10px
      }
      
      .retain-buy-page .user-jud .jud-wrapper ul li img {
        height: 40px;
        width: 40px;
        border-radius: 50%;
        vertical-align: middle
      }
      
      .retain-buy-page .user-jud .jud-wrapper ul li .jud {
        display: inline-block;
        margin-left: 10px;
        padding: 5px;
        border-radius: 6px;
        background-color: #fff;
        width: 78%;
        vertical-align: middle
      } 
      @-webkit-keyframes retain-buy-scroll {
        0% {
          -webkit-transform: translateY(0);
          transform: translateY(0)
        }
      
        to {
          -webkit-transform: translateY(-100%);
          transform: translateY(-100%)
        }
      }
      
      @keyframes retain-buy-scroll {
        0% {
          -webkit-transform: translateY(0);
          transform: translateY(0)
        }
      
        to {
          -webkit-transform: translateY(-100%);
          transform: translateY(-100%)
        }
      }
    </style>
    <div class="retain-buy-page g-img-full">
        <div class="banner g-text-center">
            <div class="g-font-16 g-margin-b"><b>剩余支付时间</b>
            </div>
            <div class="countdown g-center-block g-margin-b-15">15:00</div>
            <div class="g-color-grey">逾时将恢复原价<del>￥{$book['original']}</del>
            </div>
        </div>
        <div class="g-text-center g-color-grey">* 购买后7天内无理由退款</div>
        {if $cph}
        <div class="user-jud">
            <div class="title g-center-abs">学员学习笔记</div>
            <img src="{RES}img/failbg.png" class="g-pointer-noevent" style="height: 320px;">
            <div class="jud-wrapper jud-wrapper-high">
                <ul class="jud-main" style="animation: retain-buy-scroll {php echo count($cph)*3}s linear infinite;">
                	{loop $cph $nt}
                    <li class="jud-li">
                        <img src="{php echo toimage($nt['avatar'])}">
                        <p class="jud">{$nt['content']}</p>
                    </li>
                    {/loop}
                </ul>
                <ul class="jud-main" style="animation: retain-buy-scroll {php echo count($cph)*3}s linear infinite;">
                	{loop $cph $nt}
                    <li class="jud-li">
                        <img src="{php echo toimage($nt['avatar'])}">
                        <p class="jud">{$nt['content']}</p>
                    </li>
                    {/loop}
                </ul>
            </div>
        </div>
        {/if}
        <a style="text-decoration: none;" href="{php echo $this->murl('pay',array('id'=>$id))}" class="g-block g-join-btn g-fixed-bottom">立即报名</a>
    </div>
<script type="text/javascript">
var t = Number('{$time}');
setTime(t);
var timer = setInterval(function(){
	t--;
    if(t<0){
        clearInterval(timer);   //定时器清除；
        return;
    }
	setTime(t);
},1000);
function setTime(t){
	var i = Math.floor(t/60);
	var s = t%60;
	$('.countdown').html(i+':'+s);
}
</script>
</body>
</html>